import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function getUserInfo() {
  return Cookies.get('user-info')
}

export function setUserInfo(info) {
  return Cookies.set('user-info', info)
}

export function removeToken() {
  Cookies.remove('user-info')
  return Cookies.remove(TokenKey)
}
